package com.lehecai.core.lottery.fetcher.lotterydraw.impl;

import com.lehecai.core.lottery.LotteryType;
import com.lehecai.core.lottery.fetcher.FetcherType;
import com.lehecai.core.lottery.fetcher.lotterydraw.LotteryDraw;
import com.lehecai.core.lottery.fetcher.lotterydraw.impl.worker.AbstractLotteryDrawFetchWorker;
import com.lehecai.core.lottery.fetcher.lotterydraw.impl.worker.LotteryDrawFetchWorkerCpblm;

/**
 * 彩票百乐门 开奖结果抓取
 * @author Sunshow
 *
 */
public class CpblmLotteryDrawFetcher extends BaseLotteryDrawFetcher {

	private LotteryType lotteryType;

	protected LotteryType getLotteryType() {
		return lotteryType;
	}

	protected CpblmLotteryDrawFetcher() {

	}

	public CpblmLotteryDrawFetcher(LotteryType lotteryType) {
		this.lotteryType = lotteryType;
	}

	public CpblmLotteryDrawFetcher(Integer lotteryTypeId) {
		LotteryType lotteryType = LotteryType.getItem(lotteryTypeId);
		this.lotteryType = lotteryType;
	}
	@Override
	protected FetcherType getDefaultFetcherType() {
		return FetcherType.T_CPBLM;
	}
	
	protected LotteryDraw fetchCpblm(String phase) {
		AbstractLotteryDrawFetchWorker fetchWorker = new LotteryDrawFetchWorkerCpblm(this.getLotteryType());
		
		return fetchWorker.fetchResultDetail(phase);
	}

}
